package com.xoa.controller.party;


import com.xoa.model.party.EnDoorThree;
import com.xoa.service.party.EnDoorThreeService;
import com.xoa.util.ToJson;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * Created by gsb on 2018/1/9.
 */
@Controller
@RequestMapping("/enDoorThree")
public class EnDoorThreeController {
    @Resource
    private EnDoorThreeService enDoorThreeService;

    /**
     *
     * 创建作者:   季佳伟
     * 创建日期:   2018-1-9 下午12:10:51
     * 类介绍  :   新建
     * 构造参数:
     *
     */
    @RequestMapping(value ="insertSelective")
    @ResponseBody
    public ToJson<EnDoorThree> insertSelective(EnDoorThree enDoorThree, HttpServletRequest request, String gridLocation){
        return enDoorThreeService.insertSelective(enDoorThree, request,gridLocation);
    }
    /**
     *
     * 创建作者:   季佳伟
     * 创建日期:   2018-1-9 下午12:10:51
     * 类介绍  :   删除
     * 构造参数:
     *
     */
    @RequestMapping(value ="deleteByPrimaryKey")
    @ResponseBody
    public ToJson<EnDoorThree> deleteByPrimaryKey(Integer tid){
       return enDoorThreeService.deleteByPrimaryKey(tid);
    }

    /**
     *
     * 创建作者:   季佳伟
     * 创建日期:   2018-1-9 下午12:20:51
     * 类介绍  :  修改
     * 构造参数:
     *
     */
    @RequestMapping(value ="updateByPrimaryKeySelective")
    @ResponseBody
    public ToJson<EnDoorThree> updateByPrimaryKeySelective(EnDoorThree enDoorThree, String gridLocation){
        return enDoorThreeService.updateByPrimaryKeySelective(enDoorThree,gridLocation);
    }
    /**
     *
     * 创建作者:   季佳伟
     * 创建日期:   2018-1-9 下午12:20:51
     * 类介绍  :  详情
     * 构造参数:
     *
     */
    @RequestMapping(value ="selectById")
    @ResponseBody
    public ToJson<EnDoorThree> selectById(Integer tid) {
        return enDoorThreeService.selectById(tid);
    }

    @RequestMapping(value ="selectByList")
    @ResponseBody
    public ToJson<EnDoorThree> selectByList(EnDoorThree enDoorThree, Integer page, Integer pageSize,
                                            boolean useFlag, HttpServletRequest request, HttpServletResponse response) {
        return enDoorThreeService.selectByList(enDoorThree, page, pageSize, useFlag, request,response);
    }

    /**
     *
     * 创建作者:   季佳伟
     * 创建日期:   2018-1-9 下午12:25:51
     * 类介绍  : 列表  查询 导出
     * 构造参数:
     *
     */
    @RequestMapping(value ="queryList")
    @ResponseBody
    public ToJson<EnDoorThree> queryList(EnDoorThree enDoorThree, Integer page, Integer pageSize,
                                         boolean useFlag, HttpServletRequest request, HttpServletResponse response, String export){
        return enDoorThreeService.queryList(enDoorThree, page, pageSize, useFlag, request, response, export);
    }
    /**
     *
     * 创建作者:   季佳伟
     * 创建日期:   2018-1-9 下午12:40:51
     * 类介绍  : 导入
     * 构造参数:
     *
     */
    @RequestMapping(value ="importEnDoorThree")
    @ResponseBody
    public ToJson<EnDoorThree> importEnDoorThree(MultipartFile file, HttpServletResponse response,
                                                 HttpServletRequest request, HttpSession session) {
        return enDoorThreeService.importEnDoorThree(file, response, request, session);
    }

    @RequestMapping(value ="queryByList")
    @ResponseBody
    public ToJson<EnDoorThree> queryByList(){
        return enDoorThreeService.queryByList();
    }

}
